The present invention relates to data recording devices for recording and reproducing data on optical disks such as CD-R (Compact Disc Recordable) or CD-RW (Compact Disc Rewritable).
When recording data in optical disks such as CD-Rs and CD-RWs, an entire track or optical disk needs to be completed with one recording operation, as implied by the names of methods for writing disks, such as Disk-at-once and Track-at-once. Thus, if a data recording fails, the whole optical disk becomes unusable or the previously recorded data are lost. The recording failure can be caused by, for example, a buffer underrun error. The buffer underrun error occurs because the buffer, in which recording data are temporarily stored, is emptied when the data transfer speed of the recording data transferred from the host is slower than the data recording speed of the optical disk device and consequently a recording operation cannot be continued.
In view of this problem, Japanese Unexamined Patent Publication Nos. 10-49990 and 2000-40302 disclose an apparatus that can temporarily suspend recording operation when the recording failure is expected to occur and can restart afterwards. This apparatus has a configuration as follows. When the recording data held in the buffer reduces while the recording operation is being underway, that is, when a buffer underrun error is likely to occur, the recording operation is interrupted, and the internal information at that point is held, specifically, such as the data to be recorded next (more specifically, the pattern data indicating a pit pattern to be actually recorded and the data which are necessary to generate the pattern data) and the information indicating that the recording should be restarted at what clock of which frame. When a predetermined amount of data has been accumulated in the buffer, and after a subcode sync is detected, the recording location for the next data is detected by counting the PLL (Phase Locked Loop) clock of the channel bit, and then the recording is restarted.
However, the above-described conventional data recording device has the following problem. In such cases where buffer underrun error occurs, the above-described conventional data recording device can complete data recording properly by temporarily suspending recording operation and thereafter restarting the recording. However, if, for example, there is an external factor such as vibration, recording cannot always be completed properly. More specifically, in cases where there is an external factor such as vibration, it is likely that the data that are immediately before the interruption of recording have not been written properly due to delay in detecting the external factor or the like, and for this reason, it is difficult to secure continuity with the point where recording is interrupted with a precision in the units of channel clocks even if the restart of recording is attempted after having temporarily suspended the recording operation as in cases where buffer underrun errors occur.